<template>
    <c-modal
            :width="width"
            :visible="visible"
            :title="title"
            :top="20"
            :bottom="20"
            @cancel="cancel"
            :key="key"
    >

        <Spin size="large" fix v-if="Loading"></Spin>
        <application ref="application" @finish="finish"/>
        <div slot="footer">
        </div>
    </c-modal>
</template>

<script>
    import application from './application';
    import {postAction} from '@/api/request'

    export default {
        name: "application-modal",
        components: {
            application
        },
        data() {
            return {
                tabName: "name1",
                handleNum: 99,
                scrollable: true,
                title: "变更救助对象",
                visible: false,
                disableSubmit: false,
                width: 800,
                height: 400,
                model: {},
                familyInfo: {},
                buttonList: [],
                key: "",
                Loading: false,
            }
        },
        methods: {
            edit(record) {
                this.visible = true;
                this.familyInfo = record;
                if(record.ssca0002== '100') {
                    this.title = "城市低保政策咨询登记";
                } else {
                    this.title = "农村低保政策咨询登记";
                }
                this.$nextTick(() => {
                    this.$refs.application.edit(record);
                });
            },
            cancel() {
                this.visible = false;
            },
            finish() {
                this.$emit('ok');
                this.visible = false;
            }
        },
        created() {
            this.height = document.documentElement.clientHeight - 250;
        }
        ,
    }
</script>

<style scoped>
    #inforDiv {
        width: 100%;
        position: relative;
        margin-top: 20px;
        min-height: 200px;
    }

    #examinationButtonDiv {
        position: relative;
        margin-top: 20px;
        width: 100%;
        text-align: center;
    }

    .overflowContent {
        position: relative;
        width: 100%;
        overflow-y: auto;

    }

    /deep/ .ivu-modal-body {
        padding-top: 0px;
    }

    /deep/ .ivu-modal-footer {
        border-top: 0px;
        padding: 0px;
    }
</style>
